<?php
// +----------------------------------------------------------------------
// | KongQiAdminBase [ Laravel快速后台开发 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2012~2019 http://www.kongqikeji.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: kongqi <531833998@qq.com>`
// +----------------------------------------------------------------------

namespace App\Plugin\HostServer\Services;

use App\Plugin\Services\SearchBaseService;

class SearchService extends SearchBaseService
{
    public function whereByCategoryId($value){
        $data = [
            'category_id' => [
                'type' => '=',
                'value' => $value
            ]
        ];
        $this->addWhere($data);
    }
    public function whereByUserNameLikeQuery($value){
        $data = [
            'user_name' => [
                'type' => 'like',
                'value' => $value
            ]
        ];
        $this->addWhere($data);
    }
    public function whereByMarkNameLikeQuery($value){
        $data = [
            'mark' => [
                'type' => 'like',
                'value' => $value
            ]
        ];
        $this->addWhere($data);
    }
    public function whereByStatus($value){
        $data = [
            'status' => [
                'type' => '=',
                'value' => $value
            ]
        ];
        $this->addWhere($data);
    }
    public function whereByTypeQuery($value){
        $data = [
            'type' => [
                'type' => '=',
                'value' => $value
            ]
        ];
        $this->addWhere($data);
    }
}